<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="java.util.List" %>
<%@ page import="com.alibaba.druid.util.StringUtils" %>
<%@ page import="com.timeDeal.bean.*" %>
<%--
  Created by IntelliJ IDEA.
  User: 叼爸爸
  Date: 2016/9/12
  Time: 19:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../inc/shijianchushoutop.jsp"%>
<%
    PageList pagelist =(PageList) request.getAttribute("pageList") ;
%>
<div class="row">
    <div class="col-xs-12 hehe">
        <table class="table">
            <tr  style="margin-right: 200px">
                       <tr  style="margin-right: 200px">
                                  <th><h2>您的历史交易信息如下(null表示未作出评价)</h2></th>
                        </tr>
            </tr>
            <tr  style="margin-right: 200px">
                <th width="50%">名称</th>
                <th  style="float:left" >甲方评价</th>
                <th  style="float:left" >乙方评价</th>
                <th  style="float:left" >操作</th>
            </tr>
            <%
                if(pagelist!=null){
                    List<Object> list = pagelist.getList();
                    for(int i=0;i<list.size();i++){
                        ShijianchushouBean shijianchushouBean=(ShijianchushouBean)list.get(i);
                        String  s =StringUtils.equals(shijianchushouBean.getYifangpingjia(),null)?"尚未评价":shijianchushouBean.getYifangpingjia() ;
                        String  b =StringUtils.equals(shijianchushouBean.getJiafangpingjia(),null)?"尚未评价":shijianchushouBean.getJiafangpingjia() ;
                        %>
            <tr  style="margin-right: 200px">
                <td><a href="<%=ctxpath%>/user/shijianchushou/shijiandetail.jsp?id=<%=shijianchushouBean.getShijianchushouid()%>" >
                    <%=shijianchushouBean.getShijianchushoumingcheng()%>
                </a>
                </td>
                <td style="float:left">
                     <%=b%>
                </td>
                <td style="float:left">
                    <%=s%>
                </td>
                <td style="float:left">
                    <%if(StringUtils.equals(b,"尚未评价")&&loginuser.getYonghuid()==shijianchushouBean.getJiafangid()){%>
                       <a href="<%=ctxpath%>/user/zuochupingjia.jsp?id=<%=shijianchushouBean.getShijianchushouid()%>" >做出评价</a>
                    <%}else  if(StringUtils.equals(s,"尚未评价")&&loginuser.getYonghuid()==shijianchushouBean.getYifangid()){ %>
                    <a href="<%=ctxpath%>/user/zuochupingjia.jsp?id=<%=shijianchushouBean.getShijianchushouid()%>" >做出评价</a>
                   <% } else {%>
                        无需评价
                    <%}%>

                </td>
            </tr>
            <% }}%>
        </table>
        <%
            for(int i=0;i<pagelist.getTotalpage();i++){
        %>
        <a    href="<%=ctxpath%>/user/wodejiaoyilishigg.jsp?flag=1&currentpage=<%=i+1%>"  class=" btn"  ><%=i+1%></a>
        <%}%>
    </div>
</div>
<input id="currentpage" name="currentpage" value="${pageList.currentpage}"></input>


<%@ include file="../../inc/bottom.jsp"%>